#ifndef DRAWWIDGET_H
#define DRAWWIDGET_H

//纵轴点数目
#define DATA_NUM PERFORM_ARRAY_SIZE

#include  <QLabel>
#include <QWidget>

class DrawWidget : public QWidget
{
    Q_OBJECT

public:
    explicit DrawWidget(QWidget *parent = 0);
    ~DrawWidget();
    void setLineNum(int num,QColor *color);
    void pushData(double *data);
protected:
    void paintEvent(QPaintEvent *);
    void timerEvent(QTimerEvent *);

private:
    int line_num;
    int s_step;
    QColor *line_color;
    double *line_data;
};

#endif // DRAWWIDGET_H
